package demo;

import Util.CalculateDistanceByBboxUtil;
import Util.Neo4jCalculatePointUtil;

import java.util.ArrayList;
import java.util.List;

public class CalculateDistanceDemo {

    public static void main(String[] args) {
        List<Object> bbox = new ArrayList<Object>();
        bbox.add(118.91702579999998);
        bbox.add(32.10543309999997);
        bbox.add(118.91802890000002);
        bbox.add(32.10703259999997);

        List<Object> bbox2 = new ArrayList<Object>();
        bbox2.add(118.938307132);
        bbox2.add(32.132609500000044);
        bbox2.add(118.93920940000004);
        bbox2.add(32.13367330000004);


        List<Object> centre = Neo4jCalculatePointUtil.calculateCenter(bbox);
        List<Object> centre2 = Neo4jCalculatePointUtil.calculateCenter(bbox2);
        double result = CalculateDistanceByBboxUtil.calculate(centre, centre2);
        System.out.println(result+"米");
    }


}
